<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class ModifyUserTable2020727 extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('user', function (Blueprint $table) {
            $table->unsignedInteger('withdraw_gold')->default(0)->comment('提现金币数')->after('award');
            $table->unsignedInteger('done_task_exec_count')->default(0)->comment('完成任务总数')->after('award');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('user', function (Blueprint $table) {
            $table->dropColumn('withdraw_gold');
            $table->dropColumn('done_task_exec_count');
        });
    }
}
